package com.wpen.demo.config;
//package com.wpen.ucpjob.config;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import org.springframework.beans.factory.DisposableBean;
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.context.annotation.Configuration;
//
//import com.wpen.ucpjob.core.AgentScheduleWorker;
//
//import lombok.extern.slf4j.Slf4j;
//
///**
// * 
// * 
// * @author Wang Peng
// * @date 2022-11-28
// */
//@Configuration
//@Slf4j
//public class UcpjobConfig implements InitializingBean, DisposableBean {
//    private List<DisposableBean> listDaemonBeans = new ArrayList<>();
//
//    @Override
//    public void afterPropertiesSet() throws Exception {
//        // 启动批次扫描线程
//        AgentScheduleWorker batchScheduleWorker = AgentScheduleWorker.getInstance();
//        listDaemonBeans.add(batchScheduleWorker);
//        batchScheduleWorker.start();
//    }
//
//    @Override
//    public void destroy() throws Exception {
//        if(listDaemonBeans != null) {
//            for (DisposableBean disposableBean : listDaemonBeans) {
//                disposableBean.destroy();
//            }
//        }
//        log.info("ucp-job-agent bye..");
//    }
//
//}
